package co.com.sigma.ceplex.controller.bo;

import java.math.BigDecimal;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import co.com.sigma.ceplex.model.GisBookmark;
import co.com.sigma.ceplex.model.dao.CustomHibernateDao;

@Service
public class GisBookmarkBo {

	@Resource
	private CustomHibernateDao dao;

	public List<GisBookmark> getList() {
		return dao.find(GisBookmark.class);
	}

	public GisBookmark insert(GisBookmark entity) {
		BigDecimal id = dao.getId("GisBookmark");
		entity.setId(id);
		dao.persist(entity);
		return entity;
	}

	public void remove(GisBookmark entity) {
		dao.delete(entity);
	}

}
